package com.springboot.demo.oom;

import java.io.Serializable;

/**
 * 逃逸对象
 *
 * @author supu
 * @since 2020-06-17 14:39
 **/
public class EscapeObject implements Serializable {
    private static final long serialVersionUID = 1491545869226025760L;

    // 加上动态大小集合或者数组时（集合的值不能为空），逃逸分析则不再起作用
//    private List<String> list = new ArrayList<>(1);
//    private int[] arrays = new int[1];

    private Integer id;

    private String name;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
